/* eslint-disable */
<template>
	<div class="leafAccountMange">
		<!-- 显示搜索区域的部分 -->
	    <div class="userCollapse" >
	    	<el-form class='searchform' :inline="true" :model="accountForm" ref="accountForm" label-width="110px">
				<el-row>
					<el-col :span="24" class="flex flex-vc rowItem">
						<el-button  @click="showcollse=!showcollse" class="showsearchBtn" type="info"
							 :icon="showcollse?'el-icon-caret-top':'el-icon-caret-bottom'"  size="mini" >{{showcollse?$t('common.collseHide'):$t('common.spread')}}</el-button>
						<span class="searchTitle flex-vc inline_flex flex-hc">{{$t('searchEaraLabel.sysUserName')}}</span>
						<div class="userCollapse_item" v-if="showcollse">
							<el-form-item :label="$t('common.sysUserName')+'：'" prop="sysUserName">
								<el-autocomplete
									 v-model="accountForm.sysUserName"   :placeholder="$t('common.inputPlaceholder')"
							      :fetch-suggestions="$sysUsernameSelect"
							      @select="searchUsernameSelect" :trigger-on-focus="false"
							    ></el-autocomplete >
							</el-form-item>
							<el-form-item :label="$t('common.sysAccountType')+'：'"  prop="sysAccountType">
								<el-select v-model="accountForm.sysAccountType" :placeholder="$t('common.selectPlaceholder')"  clearable>
									<el-option v-for="(item,index) in sysAccountTypeDatas" :key="index" :label="item.label" :value="item.value"></el-option>
								</el-select>
							</el-form-item>
							<el-form-item :label="$t('common.sysAccountStatus')+'：'" prop="status">
								<el-select v-model="accountForm.status" :placeholder="$t('common.selectPlaceholder')" >
									<el-option v-for="(item,index) in statusDatas" :key="index" :label="item.label" :value="item.value"></el-option>
								</el-select>
							</el-form-item>
						</div>
						<div class="userCollapse_hide" v-if="!showcollse">
							<span>子账号名:</span><strong>【{{accountForm.sysUserName?accountForm.sysUserName:$t('common.all')}}】</strong>
							<span>子账号类型:</span><strong>【{{getSearchAreaName('sysAccountType')}}】</strong>
							<span>子账号状态:</span><strong>【{{getSearchAreaName('status')}}】</strong>
						</div>
					</el-col>
					<el-col :span="24" class="flex flex-vc rowItem">
						<span class="searchTitle flex-vc inline_flex flex-hc">{{$t('searchEaraLabel.byUserName')}}</span>
						<div  class="userCollapse_item" v-if="showcollse">
							<el-form-item :label="$t('common.byUserName')+'：'"  prop="byUserName">
								<el-autocomplete
									 v-model="accountForm.byUserName"   :placeholder="$t('common.inputPlaceholder')"
							      :fetch-suggestions="$byUsernameSelect"
							      @select="selectbyUserName" :trigger-on-focus="false"
							    ></el-autocomplete >
							</el-form-item>
							<el-form-item :label="$t('common.typeCode')+'：'" prop="typeCode">
								<el-select v-model="accountForm.typeCode" :placeholder="$t('common.selectPlaceholder')"  clearable>
									<el-option v-for="(item,index) in typeCodedatas" :key="index" :label="item.label" :value="item.value"></el-option>
								</el-select>
							</el-form-item>
							<el-form-item :label="$t('common.isActive')+'：'" prop="isActive">
								<el-select v-model="accountForm.isActive" :placeholder="$t('common.selectPlaceholder')"  clearable>
									<el-option v-for="(item,index) in isActivedatas" :key="index" :label="item.label" :value="item.value"></el-option>
								</el-select>
							</el-form-item>
							<el-form-item :label="$t('common.byStatus')+'：'" prop="byStatus">
								<el-select v-model="accountForm.byStatus" :placeholder="$t('common.selectPlaceholder')"  clearable>
									<el-option v-for="(item,index) in byStatusdatas" :key="index" :label="item.label" :value="item.value"></el-option>
								</el-select>
							</el-form-item>
						</div>
						<div class="userCollapse_hide" v-if="!showcollse">
							<span>百源账号名:</span><strong>【{{accountForm.byUserName?accountForm.byUserName:$t('common.all')}}】</strong>
							<span>是否域账号:</span><strong>【{{getSearchAreaName('typeCode')}}】</strong>
							<span>是否激活:</span><strong>【{{getSearchAreaName('isActive')}}】</strong>
							<span>百源账号状态:</span><strong>【{{getSearchAreaName('byStatus')}}】</strong>
						</div>
					</el-col>
					<el-col :span="24" class="flex flex-vc rowItem">
						<span class="searchTitle flex-vc inline_flex flex-hc">{{$t('searchEaraLabel.emp')}}</span>
						<div class="userCollapse_item" v-if="showcollse">
							<el-form-item :label="$t('modules.leafAccountManage.empCode')+'：'" prop="empCode">
								<el-input v-model="accountForm.empCode" :placeholder="$t('common.inputPlaceholder')"></el-input>
							</el-form-item>
							<el-form-item :label="$t('modules.leafAccountManage.empName')+'：'" prop="empName">
								<el-input v-model="accountForm.empName" :placeholder="$t('common.inputPlaceholder')" ></el-input>
							</el-form-item>
							<el-form-item :label="$t('common.empStatus')+'：'"  prop="empStatus">
								<el-select v-model="accountForm.empStatus" :placeholder="$t('common.selectPlaceholder')"   clearable>
									<el-option v-for="(item,index) in empStatusDatas" :key="index" :label="item.label" :value="item.value"></el-option>
								</el-select>
							</el-form-item>
						</div>
						<div class="userCollapse_hide" v-if="!showcollse">
							<span>使用人工号:</span><strong>【{{accountForm.empCode?accountForm.empCode:$t('common.all')}}】</strong>
							<span>员工姓名:</span><strong>【{{accountForm.empName?accountForm.empName:$t('common.all')}}】</strong>
							<span>是否在职:</span><strong>【{{getSearchAreaName('empStatus')}}】</strong>
						</div>
					</el-col>
				</el-row>
			</el-form>

		</div>
		<!-- 显示搜索区域的部分 -->
		<!-- 操作区域 -->
		<el-row>
			<el-col :span="18">
                <div class="operateBtn">
					<el-button @click.native="addnewLeafAccount()">{{$t('modules.leafAccountManage.add')}}</el-button>
					<el-button @click.native="updateLeafAccount()"  >{{$t('modules.leafAccountManage.modify')}}</el-button>
					<el-button @click.native="addBatchLeafAccountVisible=true" >{{$t('modules.leafAccountManage.batchAdd')}}</el-button>
					<el-button  @click.native="beforeAssign('role')">{{$t('modules.leafAccountManage.assinRole')}}</el-button>
					<el-button  @click.native="beforeAssign('datagroup')">{{$t('modules.leafAccountManage.assignDatagroup')}}</el-button>
					<el-button @click.native="changeStatus()">{{$t('modules.leafAccountManage.statusChoice')}}</el-button>
					<el-button @click="serchCustomerInfo()">{{$t('modules.leafAccountManage.searchUserInfo')}}</el-button>
				</div>
			</el-col>
			<el-col :span="6">
				<div class="searchBtn">
					<el-button type="primary" @click.native="searchLeafList()">{{$t('common.searchBtn')}}</el-button>
			        <el-button type="primary" @click.native="resetaccountForm()">{{$t('common.resetBtn')}}</el-button>
				</div>
			</el-col>
		</el-row>
		<!-- 操作区域 -->
		<!--显示百源子账号信息的列表 -->
        <el-table class="data-list"  v-loading="loading"  @row-dblclick="dbserchCustomerInfo" ref="leafAccountdata" :data="leafAccountdata" border highlight-current-row  @selection-change="changeempCode">
			<el-table-column  type="selection" width="55" fixed="left"></el-table-column>
			<el-table-column  v-for="(col, index) in tableVisibleArr" :key="index" :prop="col.prop" :label="col.label"  align="center" :formatter="formatter"  show-overflow-tooltip>
            </el-table-column>
		</el-table>
		<!--显示百源子账号信息的列表 -->
		<!-- 表格下面的显示页面和自定义表格的部分 -->
		<div class="tablebottom" style="position:relative;">
		    <el-pagination
	        @size-change="pageSizeChange"
	        @current-change="handleCurrentChangePage"
	        :current-page="pagination.pageNum"
	        :page-sizes="[5,10,20, 50, 100, 200]"
	        :page-size="pagination.pageSize"
	        layout="->,prev, pager, next, jumper, sizes,total"
	        :total="pagination.totalSize">
	        </el-pagination>
			<!-- 自定义表格字段部分 -->
			<defined-table :headArr="LeafAccountTableHeader" storageName="basp_leafAccountManage"  :selectArr="tableVisibleArr" @saveAutoDefinedTable="saveAutoDefinedTable"></defined-table>
			<!-- 自定义表格字段部分 -->
		</div>
		<!-- 表格下面的显示页面和自定义表格的部分 -->
		<!-- 新增子账号弹窗 -->
		<el-dialog class="newlyForm" :title="$t('modules.leafAccountManage.addaccount')" :visible.sync="addnewLeafAccountVisible"  width="60%" @close="dialogClose">
			<el-form  :inline="false" label-width="120px" :rules="rules1"  :model="addnewLeafAccountForm" ref="addnewLeafAccountForm">
				{{$t('modules.leafAccountManage.desc')}}
				<br><br>
				<p><span style="font-weight:bold;">{{$t('modules.leafAccountManage.step1')}}：</span>{{$t('modules.leafAccountManage.selectByaccount')}}</p>
				<el-col :span="12">
                    <el-form-item :label="$t('common.byUserName')+'：'" prop="byUserName">
						<el-select  v-model="addnewLeafAccountForm.byUserName" :placeholder="$t('common.selectPlaceholder')"  clearable filterable remote
						:remote-method="searchbyUserName" @change="serchnewCustomerInfo">
							<el-option  :key="index" :label="item.label" :value="item.value" v-for="(item,index) in byUserNameDatas"></el-option>
						</el-select>
					</el-form-item>
                </el-col>
                <el-col :span="12">
                   <el-form-item :label="$t('common.empName')+'：'" prop="empName">
						<el-input  v-model="addnewLeafAccountForm.empName" disabled :placeholder="$t('common.defaultBySys')" ></el-input>
					</el-form-item>
                </el-col>
                <el-col :span="12">
                   <el-form-item :label="$t('common.positionName')+'：'" prop="positionName">
						<el-input  v-model="addnewLeafAccountForm.positionName" disabled :placeholder="$t('common.defaultBySys')"></el-input>
					</el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item :label="$t('common.orgName')+'：'" prop="orgName">
						<el-input  v-model="addnewLeafAccountForm.orgName" disabled :placeholder="$t('common.defaultBySys')"></el-input>
					</el-form-item>
                </el-col>
                <p><span style="font-weight:bold;">{{$t('modules.leafAccountManage.step2')}}：</span>{{$t('modules.leafAccountManage.addSysByaccount')}}</p>
				<!-- 新增子账号类型 -->
				<el-col :span="12" >
				 	<el-form-item :label="$t('common.sysAccountType')+'：'" prop="sysAccountType" label-width="120px" >
						<el-select  v-model="addnewLeafAccountForm.sysAccountType" :placeholder="$t('common.selectPlaceholder')"  >
							<el-option  :key="index" :label="item.label" :value="item.value" v-for="(item,index) in sysAccountTypeDatas"></el-option>
						</el-select>
					</el-form-item>
				 </el-col>
				<!-- 新增子账号类型 -->
			</el-form>
			<div slot="footer" class="dialog-footer" style=text-align:right;>
				<el-button @click.native="giveupLeafInfo()">{{$t('common.giveUp')}}</el-button>
				<el-button type="primary" @click.native="saveleafInfo('add')">{{$t('common.save')}}</el-button>
			</div>
		</el-dialog>
		<!-- 新增子账号弹窗 -->
		<!-- 修改子账号弹窗 -->
		<el-dialog class="newlyForm" :title="$t('modules.leafAccountManage.updateaccount')" :visible.sync="updateLeafAccountVisible"  width="60%" @close="dialogClose">
			<el-form  :inline="false" label-width="110px" :rules="rules1"  :model="addnewLeafAccountForm" ref="addnewLeafAccountForm">
				 <p><span style="font-weight:bold;">{{$t('modules.leafAccountManage.step1')}}：</span>{{$t('modules.leafAccountManage.updateaccountType')}}</p>
				<el-row>
					<el-col :span="12">
						<el-form-item :label="$t('common.sysUserName')+'：'"  >
							<el-input  v-model="addnewLeafAccountForm.sysUserName" disabled :placeholder="$t('common.defaultBySys')"></el-input>
						</el-form-item>
	                </el-col>
	                <el-col :span="12">
						<el-form-item :label="$t('common.sysAccountType')+'：'"  prop="sysAccountType" >
							<el-select  v-model="addnewLeafAccountForm.sysAccountType" :placeholder="$t('common.selectPlaceholder')"  >
								<el-option  :key="index" :label="item.label" :value="item.value" v-for="(item,index) in sysAccountTypeDatas"></el-option>
							</el-select>
						</el-form-item>
	                </el-col>
				</el-row>
				<!-- 新增子账号类型 -->
				<p><span style="font-weight:bold;">{{$t('modules.leafAccountManage.step2')}}：</span>{{$t('modules.leafAccountManage.updateAssignAccount')}}</p>
				<el-col :span="12">
                    <el-form-item  :label="$t('common.byUserName')+'：'"  prop="byUserName">
						<el-select  v-model="addnewLeafAccountForm.byUserName" :placeholder="$t('common.selectPlaceholder')"  clearable filterable remote
						:remote-method="searchbyUserName" @change="serchnewCustomerInfo">
							<el-option  :key="index" :label="item.label" :value="item.value" v-for="(item,index) in byUserNameDatas"></el-option>
						</el-select>
					</el-form-item>
                </el-col>
                <el-col :span="12">
                   <el-form-item :label="$t('common.empName')+'：'" prop="empName">
						<el-input  v-model="addnewLeafAccountForm.empName" disabled :placeholder="$t('common.defaultBySys')"></el-input>
					</el-form-item>
                </el-col>
                <el-col :span="12">
                   <el-form-item :label="$t('common.positionName')+'：'" prop="positionName">
						<el-input  v-model="addnewLeafAccountForm.positionName" disabled :placeholder="$t('common.defaultBySys')"></el-input>
					</el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item :label="$t('common.orgName')+'：'" prop="orgName">
						<el-input  v-model="addnewLeafAccountForm.orgName" disabled :placeholder="$t('common.defaultBySys')"></el-input>
					</el-form-item>
                </el-col>
				<!-- 新增子账号类型 -->
			</el-form>
			<div slot="footer" class="dialog-footer" style=text-align:right;>
				<el-button @click.native="giveupLeafInfo()">{{$t('common.giveUp')}}</el-button>
				<el-button type="primary" @click.native="saveleafInfo('update')">{{$t('common.save')}}</el-button>
			</div>
		</el-dialog>
		<!-- 修改子账号弹窗 -->
		<!-- 批量新增子账号弹窗 -->
		<el-dialog class="newlyForm" :title="$t('modules.leafAccountManage.batchAddAccount')" :visible.sync="addBatchLeafAccountVisible"  width="60%" @close="dialogClose">
			<el-form  :inline="false" label-width="110px" :rules="rules1"  :model="addnewLeafAccountForm" ref="addnewLeafAccountForm">
				{{$t('modules.leafAccountManage.desc')}}
				<br><br>
				<el-row>
					<el-col :span="16" >
						<span style="font-weight:bold;">{{$t('modules.leafAccountManage.step1')}}：</span>{{$t('modules.leafAccountManage.selectByaccount')}}
				 	</el-col>
					<!--操作按钮-->
				  	<el-col :span="8" class="alignR">
				  		<el-button  type="primary" size="small" @click="addAccountVisible=true;accountText='';accountTextList=[]" >{{$t('modules.leafAccountManage.batchAddTo')}}</el-button>
				  		<el-button  type="danger" size="small" @click="removeSelect" >{{$t('modules.leafAccountManage.batchRemove')}}</el-button>
				 	</el-col>
				</el-row>
				<el-row>
                    <el-col :span="24">
						<el-table   ref="accounttableList" :data="accounttableList" border max-height="500"  style="width: 100%" @selection-change="selectAddListChange" >
				  		 	<el-table-column  type="selection" width="55"></el-table-column>
				  		 	<el-table-column prop="byAccountName" :label="$t('common.byUserName')"   show-overflow-tooltip></el-table-column>
						    <el-table-column prop="empName" :label="$t('modules.leafAccountManage.empName')"   show-overflow-tooltip> </el-table-column>
						    <el-table-column prop="positionName" :label="$t('common.positionName')"  show-overflow-tooltip> </el-table-column>
						    <el-table-column prop="orgName" :label="$t('common.orgName')"   show-overflow-tooltip> </el-table-column>
						    <el-table-column prop="netCode" :label="$t('common.netCode')"  show-overflow-tooltip> </el-table-column>
						</el-table>
						<p>{{$t('modules.leafAccountManage.counts')}}:
		                    <span class="addtionTableSpan">{{accounttableList.length}}</span>
		                    <span style="color:red;font-size:12px;" v-if="accounttableList.length>200">({{$t('modules.leafAccountManage.maxTip')}})</span>
	                    </p>
					</el-col>
                </el-row>
                <p><span style="font-weight:bold;">{{$t('modules.leafAccountManage.step2')}}：</span>{{$t('modules.leafAccountManage.addSysByaccount')}}</p>
				<!-- 新增子账号类型 -->
				 <el-col :span="12" >
				 	<el-form-item :label="$t('common.sysAccountType')+'：'"  prop="sysAccountType" label-width="110px" >
						<el-select  v-model="addnewLeafAccountForm.sysAccountType" :placeholder="$t('common.selectPlaceholder')" >
							<el-option  :key="index" :label="item.label" :value="item.value" v-for="(item,index) in sysAccountTypeDatas"></el-option>
						</el-select>
					</el-form-item>
				 </el-col>
				<!-- 新增子账号类型 -->
			</el-form>
			<div slot="footer" class="dialog-footer" style=text-align:right;>
				<el-button @click.native="giveupLeafInfo()">{{$t('common.giveUp')}}</el-button>
				<el-button type="primary" @click.native="addbatch">{{$t('common.save')}}</el-button>
			</div>
		</el-dialog>
		<!-- 批量新增子账号弹窗 -->
		<!-- 查询用户信息弹窗 -->
		<el-dialog class="newlyForm" :title="$t('common.searchEmpInfo')" :visible.sync="customInfoFormVisible"  width="50%">
			<el-form  :inline="false" label-width="120px" :model="customInfoForm" ref="customInfoForm">
				<el-form-item :label="$t('common.empCode')+'：'" prop="empCode">
					<el-input  v-model="customInfoForm.empCode"  :placeholder="$t('common.inputPlaceholder')" disabled></el-input>
				</el-form-item>
				<el-form-item :label="$t('common.empName1')+'：'" prop="empName">
					<el-input  v-model="customInfoForm.empName"  :placeholder="$t('common.inputPlaceholder')" disabled></el-input>
				</el-form-item>
				<el-form-item :label="$t('common.empStatus')+'：'" prop="empStatus">
					<el-input v-model="customInfoForm.empStatus"  :placeholder="$t('common.inputPlaceholder')" disabled></el-input>
				</el-form-item>
				<el-form-item :label="$t('common.positionName')+'：'" prop="positionName">
					<el-input  v-model="customInfoForm.positionName"  :placeholder="$t('common.inputPlaceholder')" disabled></el-input>
				</el-form-item>
				<el-form-item :label="$t('common.stationName')+'：'" prop="stationName">
					<el-input  v-model="customInfoForm.stationName"  :placeholder="$t('common.inputPlaceholder')" disabled></el-input>
				</el-form-item>
				<el-form-item :label="$t('common.positionAttr')+'：'" prop="positionAttr">
					<el-input  v-model="customInfoForm.positionAttr"  :placeholder="$t('common.inputPlaceholder')" disabled></el-input>
				</el-form-item>
				<el-form-item :label="$t('common.orgName')+'：'" prop="orgName">
					<el-input  v-model="customInfoForm.orgName"  :placeholder="$t('common.inputPlaceholder')" disabled></el-input>
				</el-form-item>
				<el-form-item :label="$t('common.netCode')+'：'" prop="netCode">
					<el-input  v-model="customInfoForm.netCode"  :placeholder="$t('common.inputPlaceholder')" disabled></el-input>
				</el-form-item>
				<el-form-item :label="$t('common.empType')+'：'" prop="empType">
					<el-select disabled v-model="customInfoForm.empType" >
						<el-option  :key="index" :label="item.label" :value="item.value" v-for="(item,index) in empTypeOptions"></el-option>
					</el-select>
				</el-form-item>
				<el-form-item :label="$t('common.lastUpdateTm')+'：'" prop="lastUpdateTm">
					<el-input  v-model="customInfoForm.lastUpdateTm"  :placeholder="$t('common.inputPlaceholder')" disabled></el-input>
				</el-form-item>
			</el-form>
		</el-dialog>
		<!-- 查询用户信息弹窗 -->
		<!--点击分配角色弹窗-->
		<assign-role :visible="assignRoleVisible" :form="assignForm" @close="closeAssighDialog"></assign-role>
   		<!--点击分配数据组弹窗-->
		<assign-datagroup :visible="assignDataGroupVisible" :form="assignForm"  @closeAssighDialog="closeAssighDialog"></assign-datagroup>
   		<!--批量添加账号-->
		<el-dialog class="newlyForm" :title="$t('modules.leafAccountManage.batchAddTo')" :visible.sync="addAccountVisible"  width="60%" :close-on-click-modal="false">
		    <el-row >
	            <p>{{$t('modules.leafAccountManage.selectByaccount')}}</p>
	            <el-input @blur="getFocusVisible=false " @change="getFocusChange" v-if="getFocusVisible" :maxlength="2000" type="textarea" :rows="8" v-model="accountText"></el-input>
	        	<div style="min-height:180px;overflow: auto;" class="el-textarea__inner" @click="getFocusVisible=true" v-if="!getFocusVisible">
	        		<span :key="index"  v-for="(item,index) in accountTextList"><span :class="item.flag? 'normalText':'errorText'">{{item.label}}</span><span v-if="index!=accountTextList.length-1">,</span></span>
	        	</div>
		   		<div style="margin-top: 5px;">{{$t('modules.leafAccountManage.supportTip')}}</div>
		    </el-row >
			<div slot="footer" class="dialog-footer">
				<el-button @click="addAccountVisible=false;">{{$t('common.giveUp')}}</el-button>
				<el-button type="primary" @click="saveAccount">{{$t('common.save')}}</el-button>
			</div>
		</el-dialog>
	</div>
 </template>
<script>
import { Message, Notification, MessageBox, Loading } from 'element-ui'
import assignRole from "../components/assignRole"
import assignDatagroup from "../components/assignDatagroup"
import definedTable from "../components/definedTable"
export default {
		name: 'leafAccountManage',
    components: {
        assignRole, assignDatagroup,definedTable
    },
    data () {
        return {
            loading: false,
            showcollse: false,
            addnewLeafAccountVisible: false,
            updateLeafAccountVisible: false,
            addBatchLeafAccountVisible: false,
            customInfoFormVisible: false,
            rules1: {
                byUserName: [
                    { required: true, message: this.$t('validateWornText.inputByAccount'), trigger: 'change' }
                ],
                sysUserName: [
                    { required: true, message: this.$t('validateWornText.inputSysUserName'), trigger: 'change' }
                ],
                sysAccountType: [
                    { required: true, message: this.$t('validateWornText.selectSysAccountType'), trigger: 'change' }
                ]
            },
            empTypeOptions: [{
                value: 1, label: 'SAP'
            }, {
                value: 2, label: 'PMP'
            }, {
                value: 3, label: 'HOS'
            }],
            // 选择某个工号,这个工号下的对应员工信息;
            empCodeList: [],
            idList: [],
            LeafAccountTableHeader: [
                { prop: "systemName", label: this.$t('common.ownerSys'), index: 0 },
                { prop: "sysAccountId", label: this.$t('common.sysAccountId'), index: 1 },
                { prop: "sysUserName", label: this.$t('common.sysUserName'), index: 2 },
                { prop: "sysAccountType", label: this.$t('common.sysAccountType'), index: 3 },
                { prop: "status", label: this.$t('common.sysAccountStatus'), index: 4 },
                { prop: "byUserName", label: this.$t('common.byUserName'), index: 5 },
                { prop: "typeCode", label: this.$t('common.typeCode'), index: 6 },
                { prop: "isActive", label: this.$t('common.isActive'), index: 7 },
                { prop: "byStatus", label: this.$t('common.byStatus'), index: 8 },
                { prop: "empCode", label: this.$t('common.empCode'), index: 9 },
                { prop: "empName", label: this.$t('common.empName1'), index: 10 },
                { prop: "empStatus", label: this.$t('common.empStatus'), index: 11 },
                { prop: "lastUpdator", label: this.$t('common.lastUpdator'), index: 12 },
                { prop: "lastUpdateTm", label: this.$t('common.lastUpdateTm'), index: 13 },
                { prop: "creator", label: this.$t('common.creator'), index: 14 },
                { prop: "createTm", label: this.$t('common.createTm'), index: 15 }
            ],
            tableVisibleArr: [],
            accountForm: {
                byUserName: "",
                accountFrom: "",
                byAccountType: "",
                byStatus: '',
                empCode: "",
                empName: "",
                typeCode: "",
                isActive: '',
                sysUserName: "",
                sysAccountType: "",
                empStatus: "",
                status: 1
            },
            addnewLeafAccountForm: {
                byAccountId: "",
                empCode: "",
                empName: "",
                positionName: "",
                orgName: "",
                byUserName: "",
                sysAccountType: '',
                sysAccountId: '',
                sysUserName: '',
                systemId: ''
            },
            customInfoForm: {
                empCode: "",
                empName: "",
                empStatus: "",
                positionName: "",
                positionAttr: "",
                orgName: "",
                netCode: "",
                lastUpdateTm: ""
            },
            accountFromdatas: [
                { value: 0, label: "BASP" },
                { value: 1, label: "SAP" },
                { value: 2, label: "PMP" },
                { value: 3, label: "HOS" },
                { value: 4, label: "CLOSE" }
            ],
            byStatusdatas: [
                { value: 1, label: (window.sessionStorage.getItem('lang') === 'zh-CN') ? "启用" : 'enabled' },
                { value: 0, label: (window.sessionStorage.getItem('lang') === 'zh-CN') ? "禁用" : 'disabled' }
            ],
            sysAccountTypeDatas: [
                { value: 0, label: (window.sessionStorage.getItem('lang') === 'zh-CN') ? "管理员" : 'Administrators' },
                { value: 1, label: (window.sessionStorage.getItem('lang') === 'zh-CN') ? "子管理员" : 'Secondary Administrator' },
                { value: 2, label: (window.sessionStorage.getItem('lang') === 'zh-CN') ? "普通用户" : 'Ordinary users' }
            ],
            typeCodedatas: [
                { value: 1, label: this.$t('common.is') },
                { value: 0, label: this.$t('common.not') }
            ],
            isActivedatas: [
                { value: 1, label: this.$t('common.active') },
                { value: 0, label: this.$t('common.nonActive') }
            ],
            statusDatas: [
                { value: 1, label: (window.sessionStorage.getItem('lang') === 'zh-CN') ? "启用" : 'enabled' },
                { value: 0, label: (window.sessionStorage.getItem('lang') === 'zh-CN') ? "禁用" : 'disabled' }
            ],
            empStatusDatas: [
                { value: 1, label: (window.sessionStorage.getItem('lang') === 'zh-CN') ? "在职" : 'Incumbent' },
                { value: 2, label: (window.sessionStorage.getItem('lang') === 'zh-CN') ? "离职" : 'resigned' }
            ],
            leafAccountdata: [],
            byUserNameDatas: [],
            allbyUserNameDatas: [],
            pagination: {
                totalSize: 0,
                pageSize: 10,
                pageNum: 1,
                totalPage: 0
            },
            assignForm: {
                systemName: "",
                subSystemName: "",
                byUserName: "",
                sysUserName: "",
                empName: "",
                positionName: "",
                orgName: "",
                byAccountId: "",
                sysAccountStatus: "",
                username: '',
                roleName: '',
                resourceName: '',
                dataGroupName: '',
                subSysCode: '',
                assignWay: ''
            },
            assignRoleVisible: false,
            assignDataGroupVisible: false,
            accounttableList: [],
            addSelectMultipleSelection: [],
            addAccountVisible: false,
            accountText: '',
            accountTextList: [],
            getFocusVisible: true
        }
    },
    mounted () {
        // 取出缓存中该页面的表格配置;
        let pageObj = localStorage.getItem('basp_leafAccountManage')
        if (pageObj) {
            let obj = JSON.parse(pageObj)
            if (obj[sessionStorage.userName]) {
                this.saveAutoDefinedTable(obj[sessionStorage.userName])
            } else {
                this.tableVisibleArr = this.$deepCopy(this.LeafAccountTableHeader, [])
            }
        } else {
            this.tableVisibleArr = this.$deepCopy(this.LeafAccountTableHeader, [])
        }
    },
    methods: {
        searchUsernameSelect (item) {
            this.accountForm.sysUserName = item.sysUserName
        },
        selectbyUserName (item) {
            this.accountForm.byUserName = item.username
        },
        searchLeafList () {
            let param = {
                // 这里的systemId是指系统id，现在固定写1，是从全局中获得;
                accountFrom: this.accountForm.accountFrom,
                byAccountType: this.accountForm.byAccountType,
                byStatus: this.accountForm.byStatus,
                byUserName: this.accountForm.byUserName,
                empCode: this.accountForm.empCode,
                isActive: this.accountForm.isActive,
                empName: this.accountForm.empName,
                typeCode: this.accountForm.typeCode,
                sysUserName: this.accountForm.sysUserName,
                sysAccountType: this.accountForm.sysAccountType,
                empStatus: this.accountForm.empStatus,
                status: this.accountForm.status,
                pageNum: this.pagination.pageNum,
                pageSize: this.pagination.pageSize
            }
            this.loading = true
            let that = this
            this.$httpExt().post('/dev-basp-user/sysAccount/queryList', param).then((response) => {
                if (response.succ === "ok") {
                    that.loading = false
                    let res = response.result
                    this.leafAccountdata = res.data
                    this.pagination.totalSize = res.totalSize
                }
            }, (response) => {
                that.loading = false
                Notification.error({
                    title: this.$t('common.exception'),
                    message: response.msg ? response.msg : this.$t('common.exceptionWornText')
                })
            })
        },
		 getSearchAreaName (val) {
		   	switch (val) {
		   		case "sysAccountType":// 子账号类型
                for (var a = 0; a < this.sysAccountTypeDatas.length; a++) {
                    if (this.accountForm.sysAccountType === this.sysAccountTypeDatas[a].value) {
                        return this.sysAccountTypeDatas[a].label
                    }
                }
                return this.$t('common.all')
            case "status":// 子账号类型
                for (var b = 0; b < this.statusDatas.length; b++) {
                    if (this.accountForm.status === this.statusDatas[b].value) {
                        return this.statusDatas[b].label
                    }
                }
                return this.$t('common.all')
            case "typeCode":
                for (var c = 0; c < this.typeCodedatas.length; c++) {
                    if (this.accountForm.typeCode === this.typeCodedatas[c].value) {
                        return this.typeCodedatas[c].label
                    }
                }
                return this.$t('common.all')
            case "isActive":
                for (var d = 0; d < this.isActivedatas.length; d++) {
                    if (this.accountForm.isActive === this.isActivedatas[d].value) {
                        return this.isActivedatas[d].label
                    }
                }
                return this.$t('common.all')
            case "byStatus":
                for (var e = 0; e < this.byStatusdatas.length; e++) {
                    if (this.accountForm.byStatus === this.byStatusdatas[e].value) {
                        return this.byStatusdatas[e].label
                    }
                }
                return this.$t('common.all')
            case "empStatus":
                for (var f = 0; f < this.empStatusDatas.length; f++) {
                    if (this.accountForm.empStatus === this.empStatusDatas[f].value) {
                        return this.empStatusDatas[f].label
                    }
                }
                return this.$t('common.all')
            default : return this.accountForm[val]; 
		   	}
	    },
        // 格式化表格数据;
        formatter (row, column) {
            switch (column.property) {
            case "sysAccountType":
                for (let i = 0; i < this.sysAccountTypeDatas.length; i++) {
                    if (row.sysAccountType == this.sysAccountTypeDatas[i].value) {
                        return this.sysAccountTypeDatas[i].label
                    }
                }
                return row.sysAccountType
            case "empStatus":
                for (let i = 0; i < this.empStatusDatas.length; i++) {
                    if (row.empStatus == this.empStatusDatas[i].value) {
                        return this.empStatusDatas[i].label
                    }
                }
                return row.empStatus
            case "isActive":
                for (let i = 0; i < this.isActivedatas.length; i++) {
                    if (row.isActive == this.isActivedatas[i].value) {
                        return this.isActivedatas[i].label
                    }
                }
                return row.isActive
            case "byStatus":
                for (let i = 0; i < this.statusDatas.length; i++) {
                    if (row.byStatus == this.statusDatas[i].value) {
                        return this.statusDatas[i].label
                    }
                }
                return row.byStatus
            case "status":
                for (let i = 0; i < this.statusDatas.length; i++) {
                    if (row.status == this.statusDatas[i].value) {
                        return this.statusDatas[i].label
                    }
                }
                return row.status
            case "typeCode":
                for (let i = 0; i < this.typeCodedatas.length; i++) {
                    if (row.typeCode == this.typeCodedatas[i].value) {
                        return this.typeCodedatas[i].label
                    }
                }
                return row.typeCode
            case "accountFrom":
                for (let i = 0; i < this.accountFromdatas.length; i++) {
                    if (row.accountFrom == this.accountFromdatas[i].value) {
                        return this.accountFromdatas[i].label
                    }
                }
                return row.accountFrom
            case "lastUpdateTm":return this.$format(row.lastUpdateTm, "yyyy/MM/dd hh:mm:ss"); 
            case "createTm":return this.$format(row.createTm, "yyyy/MM/dd hh:mm:ss"); 
            default : return row[column.property]; 
            }
        },
        saveAutoDefinedTable (arr) {
            let temp = []// 配置表格可见的选项
            for (let i = 0; i < arr.length; i++) {
                temp.push(this.LeafAccountTableHeader[arr[i]])
            }
            this.tableVisibleArr = temp
        },
        // 重置表格表格回到初始状态;
        resetaccountForm () {
            this.$refs["accountForm"].resetFields()
        },
        // 出现用户详细信息的函数;
        CustomerInfo (empCode) {
            this.customInfoFormVisible = true
            let that = this
            this.$httpExt().get('/dev-basp-user/sysAccount/queryUserInfo/' + empCode)
            .then((response) => {
                if (response.succ == "ok") {
                    for (let i in response.result) {
                        if (i == "empStatus") {
                            if (response.result[i] == 1) {
                                response.result[i] = (window.sessionStorage.getItem('lang') == 'zh-CN') ? "在职" : 'Incumbent'
                            } else {
                                response.result[i] = (window.sessionStorage.getItem('lang') == 'zh-CN') ? "离职" : 'resigned'
                            }
                        } else if (i == "lastUpdateTm") {
                            response.result[i] = that.$format(response.result[i], "yyyy/MM/dd hh:mm:ss")
                        }
                    }
                    this.customInfoForm = response.result
                }
            }, (response) => {
                Notification.error({
                    title: this.$t('common.exception'),
                    message: response.msg ? response.msg : this.$t('common.exceptionWornText')
                })
            })
        },
        // 点击用户信息展示用户信息详情;
        serchCustomerInfo () {
            if (this.empCodeList.length == 1) {
                let that = this
                this.CustomerInfo(that.empCodeList[0].empCode)
            } else {
                MessageBox({
                    message: (window.sessionStorage.getItem('lang') == 'zh-CN') ? '请仅勾选表格中的一项来查询用户信息!' : 'Please check only one item in the table to query user information',
                    confirmButtonText: this.$t('common.iknow')
                })
            }
        },
        // 双击表格展示用户信息;
        dbserchCustomerInfo (row, event) {
            this.CustomerInfo(row.empCode)
        },
        searchbyUserName (query) {
            // 当向输入框中输入的位数超过四位数时,向后台发送请求，进行模糊匹配,查询相匹配的百源账号;
            if (query.length >= 3) {
                this.$httpExt().post('/dev-basp-user/account/selectByUsername', {
                	pageNum: 1,
                    pageSize: 10,
                    username: query
                }).then((response) => {
				      if (response.succ === "ok") {
						    this.allbyUserNameDatas = response.result.data.map(item => {
							  return { value: item.username, label: item.username }
						    })
					        this.byUserNameDatas = this.allbyUserNameDatas.filter(item => {
                            return item.label.toLowerCase()
                                .indexOf(query.toLowerCase()) > -1
                        })
					  }
			        }, (response) => {
                    Notification.error({
                        title: this.$t('common.exception'),
                        message: response.msg ? response.msg : this.$t('common.exceptionWornText')
                    })
			    })
            }
        },
        serchnewCustomerInfo () {
            // 为了避免在清空百源账号名时会触发select的onchange事件;
            if (this.addnewLeafAccountForm.byUserName.length > 0) {
                let that = this
                this.$httpExt().get('/dev-basp-user/bpAccount/getEmpInfo/' + that.addnewLeafAccountForm.byUserName)
                .then((response) => {
                    if (response.succ === "ok") {
                        this.addnewLeafAccountForm.empCode = response.result ? response.result.empCode : " "
                        this.addnewLeafAccountForm.empName = response.result ? response.result.empName : " "
                        this.addnewLeafAccountForm.positionName = response.result ? response.result.positionName : " "
                        this.addnewLeafAccountForm.orgName = response.result ? response.result.orgName : " "
                        this.addnewLeafAccountForm.byAccountId = response.result ? response.result.byAccountId : " "
                    }
                }, (response) => {
                    Notification.error({
                        title: this.$t('common.exception'),
                        message: response.msg ? response.msg : this.$t('common.exceptionWornText')
                    })
                })
            }
        },
        updateLeafAccount () {
            if (this.empCodeList.length == 1) {
                this.updateLeafAccountVisible = true
                this.addnewLeafAccountForm.sysAccountId = this.empCodeList[0].sysAccountId
                this.addnewLeafAccountForm.sysAccountType = this.empCodeList[0].sysAccountType
                this.addnewLeafAccountForm.sysUserName = this.empCodeList[0].sysUserName
                this.addnewLeafAccountForm.systemId = this.empCodeList[0].systemId
                this.addnewLeafAccountForm.byUserName = this.empCodeList[0].byUserName
                this.serchnewCustomerInfo()
            } else {
                MessageBox({
                    message: (window.sessionStorage.getItem('lang') == 'zh-CN') ? '请选择一条记录进行操作!' : 'Please select a record to operate on',
                    confirmButtonText: this.$t('common.iknow')
                })
            }
        },
        removeSelect () { // 将已勾选的选项删除
            for (var i = 0; i < this.addSelectMultipleSelection.length; i++) {
                var index = this.accounttableList.indexOf(this.addSelectMultipleSelection[i])
                if (index > -1) {
                    this.accounttableList.splice(index, 1)
                }
            }
        },
        selectAddListChange (val) { // 百源账号列表勾选
            this.addSelectMultipleSelection = val
        },
        addnewLeafAccount () {
            this.addnewLeafAccountVisible = true
        },
        addbatch () {
            this.$refs["addnewLeafAccountForm"].validate((valid) => {
                if (valid) {
                    if (this.addSelectMultipleSelection.length) {
                        var urlH = '/dev-basp-user/sysAccount/batchAddSysAccount'
                        let that = this
                        var arr = []
                        for (var i = 0; i < this.addSelectMultipleSelection.length; i++) {
                            arr.push({
                                byAccountId: this.addSelectMultipleSelection[i].byAccountId,
                                empCode: this.addSelectMultipleSelection[i].empCode,
                                sysAccountType: this.addnewLeafAccountForm.sysAccountType,
                                sysUserName: this.addSelectMultipleSelection[i].byAccountName
                            })
                        }
                        this.$httpExt().post(urlH, arr).then((response) => {
                            if (response.succ === "ok") {
                                that.dialogClose()
                                that.pagination.pageNum = 1
                                that.searchLeafList()
                                this.$message({
                                    message: response.msg ? response.msg : this.$t('common.batchaddSuccess'),
                                    type: 'success'
                                })
                            } else {
                                Notification.error({
                                    title: this.$t('common.exception'),
                                    message: response.msg ? response.msg : this.$t('common.exceptionWornText')
                                })
                            }
                        }, (response) => {
                            Notification.error({
                                title: this.$t('common.exception'),
                                message: response.msg ? response.msg : this.$t('common.exceptionWornText')
                            })
                        })
                    } else {
                        MessageBox({
                            message: (window.sessionStorage.getItem('lang') == 'zh-CN') ? '请选择一条记录进行操作!' : 'Please select a record to operate on',
                            confirmButtonText: this.$t('common.iknow')
                        })
                    }
                } else {
                    return false
                }
            })
        },
        getFocusChange (param) {
            // 校验所填写工号是否合法
            var that = this
            this.$httpExt().post('/dev-basp-user/account/selectInvalidUsername', {// 查询填写的账号中不合法的账号
                usernames: this.accountText
            }).then(function (response) {
                if (response.result.length == 0 && param == 'submit') { // 没有不合法工号
                    that.submitAccount()
                } else {
                    var arr = that.accountText.split(',')
                    for (var i = 0; i < arr.length; i++) {
                        var tempindex = response.result.indexOf(arr[i])
                        if (tempindex > -1) {
                            arr[i] = {
                                label: arr[i],
                                flag: false
                            }
                        } else {
                            arr[i] = {
                                label: arr[i],
                                flag: true
                            }
                        }
                    }
                    that.accountTextList = arr
                    that.getFocusVisible = false
                }
            }, function (response) {
                that.accountTextList = that.accountText.split(',')
                that.getFocusVisible = false
                Message({
                    message: response.msg ? response.msg : this.$t('common.exceptionWornText'),
                    type: 'warning'
                })
            })
        },
        submitAccount () { // 提交后台
            var that = this
            that.$httpExt().post('/dev-basp-user/account/queryAccountInfoList', {
                usernames: this.accountText
            }).then(function (response) {
                var arr = response.result
                arr = arr.filter(item => {
                    var temp = true
                    for (var i = 0; i < that.accounttableList.length; i++) {
                        if (item.byAccountId == that.accounttableList[i].byAccountId) {
                            temp = false
                            break
                        }
                    }
                    return temp
                })
                that.accounttableList = that.accounttableList.concat(arr)
                that.addAccountVisible = false
            }, function (response) {
                Message({
                    message: response.msg ? response.msg : this.$t('common.exceptionWornText'),
                    type: 'warning'
                })
            })
        },
        saveAccount () {
            if (!this.accountText) {
                this.$message({
                    message: (window.sessionStorage.getItem('lang') == 'zh-CN') ? '请填写账号' : 'Please input account',
                    type: 'warning'
                })
            } else { // 校验
                this.getFocusChange('submit')
            }
        },
        saveleafInfo (type) {
            this.$refs["addnewLeafAccountForm"].validate((valid) => {
                if (valid) {
                    var urlH = (type == 'add') ? '/dev-basp-user/sysAccount/add' : '/dev-basp-user/sysAccount/update'
                    var msg = (type == 'add') ? this.$t('modules.leafAccountManage.addNewAccountSuccess') : this.$t('modules.leafAccountManage.updateNewAccountSuccess')
                    let that = this
                    let param = {
                        byAccountId: this.addnewLeafAccountForm.byAccountId,
                        empCode: this.addnewLeafAccountForm.empCode,
                        sysAccountType: this.addnewLeafAccountForm.sysAccountType,
                        sysUserName: (type == 'add') ? this.addnewLeafAccountForm.byUserName : this.addnewLeafAccountForm.sysUserName,
                        sysAccountId: this.addnewLeafAccountForm.sysAccountId,
                        systemId: this.addnewLeafAccountForm.systemId,
                        status: type == 'add' ? 1 : ''
                    }
                    this.$httpExt().post(urlH, param).then((response) => {
                        if (response.succ == "ok") {
                            that.dialogClose()
                            that.pagination.pageNum = 1
                            that.searchLeafList()
                            this.$message({
                                message: response.msg ? response.msg : msg,
                                type: 'success'
                            })
                        } else {
                            Notification.error({
                                title: this.$t('common.exception'),
                                message: response.msg ? response.msg : this.$t('common.exceptionWornText')
                            })
                        }
                    }, (response) => {
                        Notification.error({
                            title: this.$t('common.exception'),
                            message: response.msg ? response.msg : this.$t('common.exceptionWornText')
                        })
                    })
                } else {
                    return false
                }
            })
        },
        giveupLeafInfo () {
            this.addnewLeafAccountVisible = false
            this.addBatchLeafAccountVisible = false
            this.updateLeafAccountVisible = false
            this.dialogClose()
        },
        dialogClose () {
            this.$refs["addnewLeafAccountForm"].resetFields()
            this.addnewLeafAccountForm = {
                byAccountId: "",
                empCode: "",
                empName: "",
                positionName: "",
                orgName: "",
                byUserName: "",
                sysAccountType: '',
                sysAccountId: '',
                sysUserName: '',
                systemId: ''
            }
            this.addnewLeafAccountVisible = false
            this.addBatchLeafAccountVisible = false
            this.updateLeafAccountVisible = false
        },
        changeStatus () {
            let param = {
                systemId: 1,
                status: this.empCodeList[0].status == 0 ? 1 : 0,
                idList: this.idList
            }
            let that = this
            if (this.empCodeList.length == 0) {
                MessageBox({
                    message: (window.sessionStorage.getItem('lang') == 'zh-CN') ? '请选择一条记录进行操作!' : 'Please select a record to operate on',
                    confirmButtonText: this.$t('common.iknow')
                })
            } else {
                if (this.empCodeList[0].status == 0) {
                    // 在百源账号是禁用的状态下没有办法启用子账号;
                    this.$httpExt().post('/dev-basp-user/sysAccount/state', param)
                    .then((response) => {
                        if (response.succ == "ok") {
                            this.searchLeafList()
                            Notification.success({
                                title: (window.sessionStorage.getItem('lang') == 'zh-CN') ? '成功' : 'Success',
                                message: (window.sessionStorage.getItem('lang') == 'zh-CN') ? '启用子账号成功!' : 'Enabling Subaccounts Successfully'
                            })
                        } else {
                            Notification.error({
                                title: this.$t('common.exception'),
                                message: response.msg ? response.msg : this.$t('common.exceptionWornText')
                            })
                        }
                    }, (response) => {
						    Notification.error({
                            title: this.$t('common.exception'),
                            message: response.msg ? response.msg : this.$t('common.exceptionWornText')
                        })
                    })
                } else if (that.empCodeList[0].status == 1) {
                    this.$confirm(this.$t('modules.leafAccountManage.unableTips'), this.$t('common.tip'), {
                        confirmButtonText: this.$t('common.submitOption'),
                        cancelButtonText: this.$t('common.cancelOption'),
                        type: 'warning'
                    }).then(() => {
                        this.$httpExt().post('/dev-basp-user/sysAccount/state', param).then((response) => {
                            if (response.succ == "ok") {
                                this.searchLeafList()
                                this.$message({
                                    type: 'success',
                                    message: (window.sessionStorage.getItem('lang') === 'zh-CN') ? '禁用成功!' : 'Disable successfully'
                                })
						    }
			            }, (response) => {
                            Notification.error({
                                title: this.$t('common.exception'),
                                message: response.msg ? response.msg : this.$t('common.exceptionWornText')
                            })
				        })
                    }).catch(() => {
                    })
                }
            }
        },
        changeempCode (value) {
            this.empCodeList = value
            let that = this
            that.idList = []
            value.map(function (item, key, ary) {
                that.idList.push(item.sysAccountId)
            })
        },
        // 点击表格的某一行时改行被选中;
        pageSizeChange (val) {
            this.pagination.pageNum = 1
            this.pagination.pageSize = val
            this.searchLeafList()
        },
        handleCurrentChangePage (val) {
            this.pagination.pageNum = val
            this.searchLeafList()
        },
        beforeAssign (param) {
            if (this.empCodeList.length == 1) {
                // 在分配角色的时候需要先校验系统的状态;
			    this.$httpExt().get('/dev-basp-user/system/queryById/1').then((response) => {
                    if (response.succ == "ok") {
                        if (response.result.status == 1) {
						   this.assignForm.systemName = response.result.systemName
						   this.assignForm.byUserName = this.empCodeList[0].byUserName
						   this.assignForm.byAccountId = this.empCodeList[0].byAccountId
						   param == 'role' ? this.assignRoleVisible = true : this.assignDataGroupVisible = true
                        } else {
                            MessageBox({
						        message: this.$t('modules.leafAccountManage.assignTip'),
						        confirmButtonText: this.$t('common.iknow')
				            })
                        }
                    }
                }, (response) => {
                    Notification.error({
                        title: this.$t('common.exception'),
                        message: response.msg ? response.msg : this.$t('common.exceptionWornText')
                    })
                })
            } else {
                MessageBox({
                    message: (window.sessionStorage.getItem('lang') == 'zh-CN') ? '请仅勾选表格中的一项来进行操作!' : 'Please check only one item in the table to operate on',
                    confirmButtonText: this.$t('common.iknow')
                })
            }
        },
        closeAssighDialog () { // 授权数据组表单关闭
	    	this.assignDataGroupVisible = false
	    	this.assignRoleVisible = false
            this.assignForm = {
                systemName: "",
                subSystemName: "",
                byUserName: "",
                sysUserName: "",
                empName: "",
                positionName: "",
                orgName: "",
                byAccountId: "",
                sysAccountStatus: "",
                username: '',
                roleName: '',
                resourceName: '',
                dataGroupName: '',
                subSysCode: '',
                assignWay: ''
            }
	    }
    }
}
</script>
<style lang="less" scoped>
@import "../common/css/common.less";
/*改变表格区域里面span的宽度使其宽度统一;*/
.leafAccountMange {
	.el-form-item__label{
		display:inline-block;
		width:96px;
	}
	 p{
        display: block;
        -webkit-margin-before: 1em;
        -webkit-margin-after: 1em;
        -webkit-margin-start: 0px;
        -webkit-margin-end: 0px;
    }
    .el-select{
    	width:100%;
    }
}
.alignR {
    text-align: right;
    margin-bottom: 10px;
}
.addtionTableSpan{
    display:inline-block;
    width:auto;
    height:15px;
    padding:0px 5px;
    line-height:15px;
    text-align:center;
    border:1px solid #ccc;
    border-radius:2px;
}
.el-checkbox+.el-checkbox {
	margin-left:0px;
}
.el-checkbox{
	width:120px;
}

.leafAccountMange /deep/.el-pagination__rightwrapper {
	float:none;
	display:inline-block;
}

.el-pagination{
	text-align: center;
}
</style>
